
import { defineAsyncComponent } from "@vue/runtime-core"
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router"


const routes:Array<RouteRecordRaw>=[
    {
        path:"/",
        redirect:"/index"
    },{
        path:"/index",
        component:defineAsyncComponent(() =>import('@/views/home/index.vue'))
    },{
        path:"/coursedetail",
        component:defineAsyncComponent(() =>import('@/views/coursedetail/index.vue'))
    },{
        path:"/submit",
        component:defineAsyncComponent(() =>import('@/views/submit/index.vue'))
    },{
        path:"/login",
        component:defineAsyncComponent(() =>import('@/views/login/index.vue'))
    }



]

const router =createRouter({
    history:createWebHashHistory(),
    routes
})

export default router